package freespiritsocial.io.user.ui.adapter.search

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.module.LoadMoreModule
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder
import freespiritsocial.io.user.R
import freespiritsocial.io.user.databinding.ItemIamgesBinding
import freespiritsocial.io.user.ext.setAdapterAnimation
import java.util.*

/**
 * 图片适配器
 */
class ImagesAdapter(
    data: ArrayList<String> = arrayListOf(),
    layoutResIdRes: Int = R.layout.item__iamges
):
    BaseQuickAdapter<String,BaseDataBindingHolder<ItemIamgesBinding>>(layoutResIdRes,data),LoadMoreModule {
    init {
        setAdapterAnimation(0)
    }

    override fun convert(holder: BaseDataBindingHolder<ItemIamgesBinding>,item: String) = with(holder.dataBinding) {
        this?.image = item
    }
}